Release 10.1A: OpenEdge Development:
.NET Open Clients


Passing a TABLE or TABLE-HANDLE as an INPUT parameter

When the client application passes a static temp-table (TABLE parameter) as an INPUT parameter, the client must provide an instance of the strongly typed DataTable class provided by ProxyGen. In this case, the definition of the temp-table is known at compile time, and the proxy already knows the schema (meta data) for the temp-table; therefore, the client application does not need to supply the schema, only the data. The client can add rows to the temp-table using the Rows.Add() method on the strongly typed DataTable class.

When the client application passes a dynamic temp-table (TABLE-HANDLE parameter) as an INPUT parameter, the proxy does not know the schema (meta data) for the temp-table. In this case, the client must provide an instance of System.Data.DataTable that contains both the schema and data for the TABLE-HANDLE parameter. The client can use the methods on the System.Data.DataTable class to add the schema and rows for the temp-table. The client can also pass a Progress.Open4GL.ProDataTable. For more information, see the "ProDataTable class" section.

Also, the client might need to define Progress-specific mappings for the DataTable. See the "Providing Progress extensions for INPUT TABLE-HANDLE parameters" section.

Note: It is important that the schema field order defined for the .NET DataTable match the physical order defined for the temp-table in the 4GL. See the "Providing Progress extensions for INPUT TABLE-HANDLE parameters" section.

Since all strongly typed DataTable classes inherit from Progress.Open4GL.ProDataTable which in turn inherits from System.Data.DataTable, these classes can be passed as an INPUT TABLE-HANDLE parameter, as long as the 4GL procedure is written to process the schema and data provided in the strongly typed DataTable class.

For INPUT parameters, all the data must be put into the parameter before the proxy call is made.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095